package factoryGame;

import game.constants.ImagesSingleton;
import game.constants.ReferenceObject;
import objects.ImageObject;


public class ImageObjectFactory {
	
	public static ImageObject createImageObject(int type){
		ImageObject img =new ImageObject();
		switch (type){
		
		case ReferenceObject.OBJECT_REFERENCE_MINERALS:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_MINERALS]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_MINERALS]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_VESPENE_GAS:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_VESPENE_GAS]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_VESPENE_GAS]);
			
			break;
		
		case ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_BARRACK1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BARRACK1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BARRACK1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_ACADEMY1:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_ACADEMY1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_ACADEMY1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_REFINERY1:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_REFINERY1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_REFINERY1]);
			
			break;
			
		
		case ReferenceObject.OBJECT_REFERENCE_SVC1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_SVC1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_SVC1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_MARINE1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_MARINE1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_MARINE1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_FIREBAT1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_FIREBAT1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_FIREBAT1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER2:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_COMMAND_CENTER1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_BARRACK2:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BARRACK1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BARRACK1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_ACADEMY2:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_ACADEMY1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_ACADEMY1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_REFINERY2:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_REFINERY1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_REFINERY1]);
			
			break;
			
		
		case ReferenceObject.OBJECT_REFERENCE_SVC2:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_SVC1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_SVC1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_MARINE2:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_MARINE1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_MARINE1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_FIREBAT2:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_FIREBAT1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_FIREBAT1]);
			
			break;
			
		case ReferenceObject.OBJECT_REFERENCE_BONES1:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BONES1]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BONES1]);
			
			break;
		case ReferenceObject.OBJECT_REFERENCE_RAT:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_RAT]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_RAT]);
			
			break;
			

		case ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
		break;
		case ReferenceObject.OBJECT_REFERENCE_BACKGROUND_1:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
		break;
		case ReferenceObject.OBJECT_REFERENCE_BACKGROUND_2:
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_BACKGROUND_3]);
		break;
			
		default:
			
			img.setImageToShow(ImagesSingleton.images[ReferenceObject.OBJECT_REFERENCE_POTION]);
			img.setCollisionShape(ImagesSingleton.imagesCollision[ReferenceObject.OBJECT_REFERENCE_POTION]);
			System.out.println("NO se que cargue, Cuidado con las collisiones-> ImageObjectFactory");
			
			break;
		
		}
		
		return img;
	}
	

}
